package Game;
import java.io.Serializable;

/**
 * Truck.java
 *
 * This class represents a new Truck object in the Oregon Trail game. A Truck is one of the Vehicle types 
 * in the Team Mexican Buzz implementation of Oregon Trail
 * A Truck is composed of an engine, two axles, and four wheels
 * 
 * @author Raymond DeCuir, rdecuir3 at gatech.edu
 * @version 1.5
 *
 */
public class Truck extends Vehicle {

	// The different parts of the truck,
	private VehicleNode engine, frontAxle, rearAxle, frontRightWheel, frontLeftWheel, rearRightWheel, rearLeftWheel;


	/**
	 * Constructor for the Truck object, this constructor creates the engine, frontAxle, rearAxle, frontRightWheel, frontLeftWheel, rearRightWheel, and rearLeftWheel
	 * 
	 */
	public Truck()
	{
		parts = new VehicleNode[7];
		this.weightCapacity = GameDriver.getItemList().getItemWeight( GameDriver.getItemList().getIdOf("name", "Truck") );
		engine = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Engine") );
		parts[0] = engine;
		frontAxle = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Axle") );
		parts[1] = frontAxle;
		rearAxle = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Axle") );
		parts[2] = rearAxle;
		frontRightWheel = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Wheel") );
		parts[3] = frontRightWheel;
		frontLeftWheel = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Wheel") );
		parts[4] = frontLeftWheel;
		rearRightWheel = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Wheel") );
		parts[5] = rearRightWheel;
		rearLeftWheel = new VehicleNode( GameDriver.getItemList().getIdOf("name", "Truck Wheel") );
		parts[6] = rearLeftWheel;
	}
}